$(document).ready(function() { 

	// Datepicker
		
		$('#buildTime').datepicker({
			inline: true,
			changeMonth: true,
			changeYear: true,
			closeText:"关闭",
			gotoCurrent:true,
			showButtonPanel: true,
			constrainInput:false
			
		});
		//$('#buildTime').datepicker('setDate', '1940-01-01')
	//验证部分
		$("#classesCreate").validate({
            rules: {
                level : {
					required : true
                },
                grade : {
					required : true
                },
				team : {
					required : true
                },
				master : {
					required : true
                },
				buildTime : {
					required : true
                }
            },
            messages: {
                level : {
                    required : "请选择班级类别！"
                },
                grade : {
                    required : "请选择班级年级！"
                },
				team : {
                    required : "请选择班级！"
                },
				master : {
                    required : "请选择班级班主任！"
                },
				buildTime : {
                    required : "请选择班级建立时间！"
                }
            }
        });
  });

  